home *** CD-ROM | disk | FTP | other *** search
/ CU Amiga Super CD-ROM 25 / CU Amiga Magazine's Super CD-ROM 25 (1998)(EMAP Images)(GB)(Track 1 of 2)[!][issue 1998-08].iso / CUCD / Programming / ixemul / sdk / man / cat5 / acct.0 < prev    next >
Encoding:
Text File  |  1998-06-15  |  2.5 KB  |  64 lines

  1.  
  2. ACCT(5)                    UNIX Programmer's Manual                    ACCT(5)
  3.  
  4. NNAAMMEE
  5.      aacccctt - execution accounting file
  6.  
  7. SSYYNNOOPPSSIISS
  8.      ##iinncclluuddee <<ssyyss//aacccctt..hh>>
  9.  
  10. DDEESSCCRRIIPPTTIIOONN
  11.      The kernel maintains the following _a_c_c_t information structure for all
  12.      processes. If a process terminates, and accounting is enabled, the kernel
  13.      calls the acct(2) function call to prepare and append the record to the
  14.      accounting file.
  15.  
  16.      /*
  17.       * Accounting structures; these use a comp_t type which is a 3 bits base 8
  18.       * exponent, 13 bit fraction ``floating point'' number.  Units are 1/AHZ
  19.       * seconds.
  20.       */
  21.      typedef u_short comp_t;
  22.  
  23.      struct acct {
  24.              char    ac_comm[10];    /* name of command */
  25.              comp_t  ac_utime;       /* user time */
  26.              comp_t  ac_stime;       /* system time */
  27.              comp_t  ac_etime;       /* elapsed time */
  28.              time_t  ac_btime;       /* starting time */
  29.              uid_t   ac_uid;         /* user id */
  30.              gid_t   ac_gid;         /* group id */
  31.              short   ac_mem;         /* memory usage average */
  32.              comp_t  ac_io;          /* count of IO blocks */
  33.              dev_t   ac_tty;         /* controlling tty */
  34.      #define AFORK   0x01            /* forked but not execed */
  35.      #define ASU     0x02            /* used super-user permissions */
  36.      #define ACOMPAT 0x04            /* used compatibility mode */
  37.      #define ACORE   0x08            /* dumped core */
  38.      #define AXSIG   0x10            /* killed by a signal */
  39.              char    ac_flag;        /* accounting flags */
  40.      };
  41.  
  42.      /*
  43.       * 1/AHZ is the granularity of the data encoded in the comp_t fields.
  44.       * This is not necessarily equal to hz.
  45.       */
  46.      #define AHZ     64
  47.  
  48.      #ifdef KERNEL
  49.      struct vnode    *acctp;
  50.      #endif
  51.  
  52.      If a terminated process was created by an execve(2),  the name of the ex-
  53.      ecuted file (at most ten characters of it) is saved in the field _a_c___c_o_m_m
  54.      and its status is saved by setting one of more of the following flags in
  55.      _a_c___f_l_a_g_: AFORK, ASU, ACOMPAT, ACORE and ASIG.
  56.  
  57. SSEEEE AALLSSOO
  58.      acct(2),  accton(8),  execve(2),  lastcomm(1),  sa(8)
  59.  
  60. HHIISSTTOORRYY
  61.      A aacccctt file format appeared in Version 7 AT&T UNIX.
  62.  
  63. BSD Experimental                 June 5, 1993                                1
  64.